for i=1:NIt
    for j=1:NJt
        
        if (i<=NIe && j>NJe) continue; end
        centro = 4;
        if (i==1) centro = centro -1; end
        if (j==1) centro = centro -1; end
        if (i==NIt) centro = centro + 1; end    % GUARDA referencia presión lado derecho
        if (j==NJt) centro = centro -1; end
        if (j==NJe && i<=NIe) centro = centro -1; end
        if (j>NJe && i==NIe+1) centro = centro -1; end
        
        M( Pmap(i,j) , Pmap(i,j) ) = - centro;
        
        if ( (i>1) && ~((i==NIe+1) && (j>NJe)) )     M (Pmap (i,j) , Pmap (i-1,j) ) = 1; end          % Nodes with left neighbours
        if ( j>1 )                                   M (Pmap (i,j) , Pmap (i,j-1) ) = 1; end          % Nodes with bot neighbours
        if ( i<NIt )                                 M (Pmap (i,j) , Pmap (i+1,j) ) = 1; end          % Nodes with right neighbours
        if ( ~( (j==NJe) && (i<=NIe) ) && (j<NJt) )  M (Pmap (i,j) , Pmap (i,j+1) ) = 1; end          % Nodes with top neighbours
        
    end
end

M = sparse (M);